package com.jianqiao.delivery.midtrans.domain;

import com.jianqiao.delivery.midtrans.domain.vo.CreditCardVo;
import com.jianqiao.delivery.midtrans.domain.vo.CustomerDetailsVo;
import com.jianqiao.delivery.midtrans.domain.vo.TransactionDetailsVo;
import lombok.Data;

/**
 * author: cyx
 * create: 2024/8/7 11:00
 **/
@Data
public class PayRequestBodyEntity {
    private CreditCardVo credit_card;
    private CustomerDetailsVo customer_details;
    private TransactionDetailsVo transaction_details;

    public PayRequestBodyEntity(CreditCardVo credit_card, CustomerDetailsVo customer_details, TransactionDetailsVo transaction_details) {
        this.credit_card = credit_card;
        this.customer_details = customer_details;
        this.transaction_details = transaction_details;
    }

    public static PayRequestBodyEntityBuild builder(){
        return new PayRequestBodyEntityBuild();
    }

    public static class PayRequestBodyEntityBuild{
        private CreditCardVo credit_card;
        private CustomerDetailsVo customer_details;
        private TransactionDetailsVo transaction_details;

        PayRequestBodyEntityBuild(){

        }

        public PayRequestBodyEntityBuild credit_card(final CreditCardVo credit_card){
            this.credit_card = credit_card;
            return this;
        }

        public PayRequestBodyEntityBuild customer_details(final CustomerDetailsVo customer_details){
            this.customer_details = customer_details;
            return this;
        }

        public PayRequestBodyEntityBuild transaction_details(final TransactionDetailsVo transaction_details){
            this.transaction_details = transaction_details;
            return this;
        }

        public PayRequestBodyEntity build(){
            return new PayRequestBodyEntity(this.credit_card ,this.customer_details ,this.transaction_details);
        }
    }
}
